import request from "@/utils/req";

// 获取员工列表

export function getEmployeeListApi(params) {
  return request({
    url: "/sys/user",
    method: "get",
    params,
  });
}
//删除员工
export function deleteEmployeeApi(id) {
  return request({
    url: `/sys/user/${id}`,
    method: "delete",
  });
}

// 新增员工
export function newEmployeeApi(data) {
  return request({
    url: "/sys/user",
    method: "post",
    data,
  });
}
// 更新员工
export function editEmployeeApi(data) {
  return request({
    url: `/sys/user/${data.id}`,
    method: "put",
    data,
  });
}

//获取员工基本详情信息
export function getEmployeeDetailApi(id) {
  return request({
    url: `/sys/user/${id}`,
    method: "get",
  });
}
